import { http } from "@/utils/http";

export type commonResult<T> = {
  code: number;
  msg: string;
  result: T;
};
export type infoType = {
  id?: number,
  unityId?: number,
  screenName?: string,
  screenLogo?: string,
  screenMode?: number,
  screenTheme?: string,
  appTheme?: string,
  screenMenus?: {
    menuName: string,
    menuType: number,
    url: string
  }[],
}
/** 1.2.16.2单位设置回显 */
export const getInfo = (params?: object) => {
  return http.request<commonResult<infoType>>("get", '/system/system/v2/unity/setting', {
    params
  });
};
/** 1.2.16.1保存单位设置 */
export const editInfo = (data?: object) => {
  return http.request<commonResult<any>>("put", '/system/system/v2/unity/setting', {
    data
  });
};
